<script type="text/javascript">
$(document).ready(function(){
	var counter = 5;
	var interval = setInterval(function() {
	    counter--;
	    // Display 'counter' wherever you want to display it.
	    $('span').html('( '+counter+'s )');
	    if (counter == 0) {
	        // Display a login box
	        window.location.href="<?=site_url('admin990/lunchbox')?>";
	        clearInterval(interval);
	    }
	}, 1000);					
});

</script>
<div class="body" style="text-align: center;">

<div class="lunchbox">
<table align="center" width="30%">
<tr style="background-color: #999;">
<td>Nom du fichier</td>
<td>Taille</td>
<td>Date</td>
<td>Voir</td>
</tr>
<?php if(!$files){?>
			<tr>
			<td>Il n'a y pas de fichier lunch box...</td>
			</tr>
			<?php }else{?>
			<?php foreach ($files as $file):?>
			<tr>
			<td><?=$file['name']?>
			</td>
			<td><?=$file['size']?>
			</td>
			<td><?=date(('d-m-Y H:i:s'),$file['date'])?>
			</td>
			<td><a href="<?=base_url('lunch_pdf').'/'.$file['name']?>"
				target="_blank"><img src="<?=base_url('resources/imgs/find.png')?>"
					height="20" />
			</a>
			</td>
			</tr>
			<?php endforeach;?>
			<?php }?>
			<?php if(!$cartes){?>
			<tr>
			<td>Il n'a y pas de carte de menu...</td>
			</tr>
			<?php }else{?>
			<?php foreach ($cartes as $carte):?>
			<tr>
			<td><?=$carte['name']?>
			</td>
			<td><?=$carte['size']?>
			</td>
			<td><?=date(('d-m-Y H:i:s'),$carte['date'])?>
			</td>
			<td><a href="<?=base_url('carte_pdf').'/'.$carte['name']?>"
				target="_blank"><img src="<?=base_url('resources/imgs/find.png')?>"
					height="20" />
			</a>
			</td>
			</tr>
			<?php endforeach;?>
			<?php }?>
</table>
<hr/>

<br/>

<?php if(isset($msg)){ echo $msg;}?>
<?php if(isset($error)){ echo '<div class="error">'.$error['error'].'</div>';}?>
	<h4><a href="<?=site_url('admin990/lunchbox')?>"><b>retour</b> <span>( 5s )</span></a></h4>
</div>

</div>
</body>